<?php
class Staticizer_Index_Exhibition extends Staticizer
{
    public function Build($param=NULL)
    {
        #获取数据
        $data=DB::GetRows('select ID,Thumbnail_Poster,Title,Content,Datetime,M_HTMLFile from Exhibition where M_IsCooperation=TRUE order by Datetime desc limit 0,6');

        #处理数据
        foreach($data as &$row)
        {
            $row['Thumbnail_Poster']=Config::PATH_RELATIVE_ATTACHMENT_EXHIBITION.'/'.$row['Thumbnail_Poster'];
            
            $row['M_HTMLFile']=Config::PATH_RELATIVE_CONTENT_EXHIBITION.'/'.$row['M_HTMLFile'];
        }

        #绑定数据
        View::Assign('Exhibitions',$data);

        #生成静态
        $this->Save('index/exhibition.html',View::Fetch('index/exhibition.tpl'));
    }
}
?>